From 24f2d7393849de5aec0ff36f3b02d22d327de59e Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 30 Mar 2010 08:32:34 +0100 Subject: [PATCH] mcheck: Small fix for CMCI Threshold set problem. When generating new threshold value, we must firstly clean old value before or the new set value since the new value might be different with the old (BIOS might pre-set some threshold). Signed-off-by: Liping Ke Signed-off-by: Ying Huang --- xen/arch/x86/cpu/mcheck/mce_intel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/cpu/mcheck/mce_intel.c b/xen/arch/x86/cpu/mcheck/mce_intel.c index 9e56df9ca9..0eefd9263c 100644 --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -824,6 +824,8 @@ static int do_cmci_discover(int i) clear_bit(i, __get_cpu_var(mce_banks_owned)); goto out; } + + val &= ~CMCI_THRESHOLD_MASK; wrmsrl(msr, val | CMCI_EN | CMCI_THRESHOLD); rdmsrl(msr, val); -- 2.30.2